#pragma once
#include <stdio.h>

#define SIZE 2048
#define NONE_FLUSH (1<<1)
#define LINE_FLUSH (1<<2)
#define FULL_FLUSH (1<<3)


typedef struct _myfile
{
    int fileno;
    char outbuffer[SIZE];
    int pos;
    int cap;
    int flush_mode;
}myfile;

myfile* myfopen(const char* pathname, const char* mode);
int my_fwrite(myfile* fp,const char* s,int size);
void my_flush(myfile* fp);
void my_fclose(myfile* fp);
void DebugPrint(myfile* fp);

